<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AdvPosition extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
       Schema::create('adv_position',function (Blueprint $table){
           $table->increments('ap_id')->comment('广告位置id');
           $table->string('ap_name')->comment('广告位置名');
           $table->smallInteger('ap_class')->unsigned();
           $table->smallInteger('ap_display')->comment('广告位是否启用');
           $table->smallInteger('is_use')->unsigned();
           $table->integer('ap_with')->comment('广告位宽度');
           $table->integer('ap_height')->comment('广告位高度');
           $table->integer('adv_num')->unsigned()->comment('拥有的广告数');
           $table->integer('click_num')->unsigned()->comment('广告位点击率');
           $table->string('default_content')->comment('广告位默认内容');
       });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('adv_position');
    }
}
